<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="../lib/layui/css/layui.css">
  <link rel="stylesheet" href="../styles/css/index.css">
  <script src="../lib/layui/layui.js"></script>
</head>

<body>
  <div class="content">
    <div class="headTitle"><span class="w-blueline"></span>管理区添加</div>
    <form class="layui-form" action="">
      <div class="layui-row">
        <div class="layui-col-md5">
          <div class="layui-form-item">
            <label class="layui-form-label">所属农场</label>
            <div class="layui-input-block">
              <select name="city" lay-verify="required">
                <option value=""></option>
                <option value="0">农场A</option>
                <option value="1">农场B</option>
              </select>
            </div>
          </div>
        </div>
        <div class="layui-col-md7"><span>&nbsp;</span></div>
      </div>
      <div class="layui-form-item">
        <div class="layui-col-md5">
        <label class="layui-form-label">管理区名称</label>
        <div class="layui-input-block">
          <input type="text" name="title" required lay-verify="required" placeholder="请输入管理区名称" autocomplete="off"
            class="layui-input">
        </div>
        </div>
        <div class="layui-col-md5">
          <label class="layui-form-label">管理区地址</label>
          <div class="layui-input-block">
            <input type="text" name="title3" required lay-verify="required" placeholder="请输入管理区地址" autocomplete="off"
                   class="layui-input">
          </div>
        </div>
      </div>
      <div class="layui-row">
        <div class="layui-col-md5">
          <div class="layui-form-item">
            <label class="layui-form-label">管理区负责人</label>
            <div class="layui-input-block">
              <input type="text" name="title1" required lay-verify="required" placeholder="请输入负责人" autocomplete="off"
                class="layui-input">
            </div>
          </div>
        </div>
        <div class="layui-col-md5">
          <div class="layui-form-item">
            <label class="layui-form-label">联系方式</label>
            <div class="layui-input-block">
              <input type="text" name="title2" required lay-verify="required" placeholder="请输入联系方式" autocomplete="off"
                class="layui-input">
            </div>
          </div>
        </div>
      </div>
      <div class="layui-form-item layui-form-text">
        <div class="layui-col-md10">
          <label class="layui-form-label">管理区描述</label>
          <div class="layui-input-block">
            <textarea name="desc" required lay-verify="required" placeholder="请输入内容" class="layui-textarea"></textarea>
          </div>
        </div>
      </div>
      <div class="layui-row">
        <div class="layui-col-md4">
          <span>&nbsp;</span>
        </div>
        <div class="layui-col-md4">
          <div class="layui-form-item">
            <div class="layui-input-block">
              <button class="layui-btn" lay-submit lay-filter="formDemo">保存</button>
              <button type="reset" class="layui-btn layui-btn-primary">取消</button>
            </div>
          </div>
        </div>
        <div class="layui-col-md4">
          <span>&nbsp;</span>
        </div>
      </div>
    </form>
  </div>
</body>

</html>
<script>
  layui.use('form', function () {
    var form = layui.form;
    //监听提交
    form.on('submit(formDemo)', function (data) { //提交事件回调
      layer.msg(JSON.stringify(data.field));
      return false;
    });
  });
</script>